<div class="row small-gutters" style="padding: 0.7em">
  <div class="col-sm-6 col-md-4 " style="padding-bottom: 1.5em">
    {{form_add_method.duration.label(class_='control-label')}}
    <div>
      {{form_add_method.duration(class_='form-control')}}
    </div>
  </div>
  <div class="col-12">
    {{_('Define the setpoint over a period of time, based on specific durations of time.')}}
    <br>{{_('Duration here is defined as the amount of time after the previous duration. If this is the first duration added, this will be the beginning of the method. If this is not the first duration added, it will execute after the last duration already in the method.')}}
  </div>
</div>

<div class="row small-gutters" style="padding: 0.7em">
  <div class="col-auto">
    {{form_add_method.setpoint_start.label(class_='control-label')}}
    <div>
      {{form_add_method.setpoint_start(class_='form-control', value=last_setpoint)}}
    </div>
  </div>
  <div class="col-sm-6 col-md-4">
    {{form_add_method.setpoint_end.label(class_='control-label')}}
    <div>
      {{form_add_method.setpoint_end(class_='form-control')}}
    </div>
  </div>
</div>

<div class="row">
  <div class="col-auto">
    <label class='control-label'></label>
    <div>
      {{form_add_method.save(class_='form-control btn btn-primary btn-sm')}}
    </div>
  </div>
</div>
<div class="row align-items-end small-gutters" style="padding: 0.7em">
  <div style="padding: 1em">
    {{_('Use the following options to instruct the method to restart when it reaches the end.')}}
    {{_('If you do not wish for the method to repeat, do not use this option.')}}
    {{_('You may enter a duration (seconds) that the method will end after, otherwise leave blank to repeat forever.')}}
  </div>
  <div class="col-auto">
    {{form_add_method.duration_end.label(class_='control-label')}}
    <div>
      {{form_add_method.duration_end(class_='form-control')}}
    </div>
  </div>
  <div class="col-auto">
    {{form_add_method.restart(class_='btn btn-primary',**{'onclick':'return confirm("This will instruct the method to be restarted once it finishes. No more durations may be added if this option is used. Confirm adding restart at the end of this method?")'})}}
  </div>
</div>
